ROS2 Humble integration with
UR3e
- Power on a robot with the button on the teach pendant and connect an
ethernet cable between the robot and your PC.
- For ROS2 humble, please build from sources (there is a
ros2_control
related error with system installation of ur
packages):
sudo apt install python3-colcon-common-extensions python3-vcstool
mkdir ur_ws
cd ur_ws
git clone -b humble https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver.git src/Universal_Robots_ROS2_Driver
vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/Universal_Robots_ROS2_Driver-not-released.${ROS_DISTRO}.repos
rosdep update
rosdep install --ignore-src --from-paths src -y
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
source install/setup.bash
- Configure PC and robot’s network as here:
https://docs.universal-robots.com/Universal_Robots_ROS2_Documentation/doc/ur_robot_driver/ur_robot_driver/doc/installation/robot_setup.html
- Then go to the Manual mode (the teacher has the required password)
and set in the robot menu in
Installation -> URCAPS -> External Control
the Host
IP (if you follow the instruction it is 192.168.1.101)
- Disable firewall:
sudo ufw disable
- Run the launch file with robot ip address (you can check it it
About
tab on the teach pendant):
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur3e robot_ip:=192.168.1.102 launch_rviz:=false
- On the robot, run the program with
External Control
.
- In the second terimanl, run Moveit with RViz:
ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur3e robot_ip:=192.168.1.102 launch_rviz:=true
or you could run example:
ros2 launch ur_robot_driver test_scaled_joint_trajectory_controller.launch.py